@extends('admin.app')

@section('content')
  <div class="panel panel-default">
    <div class="panel-heading font-bold">
      代码信息
    </div>
    <div class="panel-body">
      <form class="form-horizontal">
        <div class="form-group">
          <label class="col-lg-2 control-label">代码：</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ $code->code }}</p>
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">名称：</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ $code->name }}</p>
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">代码类别：</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ $codeType->name }}</p>
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">父代码：</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ $code->parent_code ?? '无' }}</p>
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">层级：</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ $code->level }}</p>
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">排序：</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ $code->sort }}</p>
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">叶子节点：</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ $code->tree ? '是' : '否' }}</p>
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <label class="col-lg-2 control-label">描述：</label>
          <div class="col-lg-10">
            <p class="form-control-static">{{ $code->description }}</p>             
          </div>
        </div>
        <div class="line line-dashed b-b line-lg"></div>
        <div class="form-group">
          <div class="col-lg-4 col-lg-offset-2">
            <a href="{{ admin_action('System\CodesController@index', [$codeType]) }}" class="btn btn-default">返&nbsp;回</a>
          </div>
        </div>
      </form>
    </div>
  </div>
@endsection